package com.llly.client;


import com.llly.client.impl.UserFeignClientImpl;
import com.llly.pojo.Easybuy_user;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import java.util.Map;

@Component
@FeignClient(name = "provider9091",fallback = UserFeignClientImpl.class)
public interface UserFeignClient {

    @RequestMapping("/login")
    public Easybuy_user login(@RequestParam String loginName , @RequestParam String password);

    @PostMapping("/adduser")
    public int adduser(@RequestBody Easybuy_user ea);

    @RequestMapping("/iddetails")
    public Easybuy_user iddetails(@RequestParam Integer id);

    @RequestMapping("/showUsers")
    public Map<String,Object> showUsers(@RequestParam Integer PageIndex);

    @RequestMapping("/deleteUsers")
    public int deleteUsers(@RequestParam Integer id);

    @PostMapping("/updateUser.do")
    public int updateUser(@RequestBody Easybuy_user ea);
}
